<%@ page import="org.grails.bookmarks.*" %> 
<script type="text/javascript">

            /*
                 Initialize and render the Menu when its elements are ready 
                 to be scripted.
            */

            YAHOO.util.Event.onContentReady("productsandservices", function () {

                /*
                     Instantiate a Menu:  The first argument passed to the 
                     constructor is the id of the element in the page 
                     representing the Menu; the second is an object literal 
                     of configuration properties.
                */

                var oMenu = new YAHOO.widget.Menu(
                                    "productsandservices", 
                                    {
                                        position: "static", 
                                        hidedelay: 750, 
                                        lazyload: true, 
                                        effect: { 
                                            effect: YAHOO.widget.ContainerEffect.FADE,
                                            duration: 0.25
                                        } 
                                    }
                            );


                /*
                     Define an array of object literals, each containing 
                     the data necessary to create a submenu.
                */

                var aSubmenuData = [
                     {
                        id: "Back-End",
                        itemdata: [
                            { text: "Menu", url: "/mallow/menuItem" },
                            { text: "Bookmark", url: "/mallow/bookmark" },
                            { text: "Podcast", url: "/mallow/podcast" },
                        ]
                    },
               
                    {
                        id: "Front-End", 
                        itemdata: [ ] 
                    }
                    

                ];


                // Subscribe to the Menu instance's "beforeRender" event

                oMenu.subscribe("beforeRender", function () {

                    if (this.getRoot() == this) {

                        this.getItem(0).cfg.setProperty("submenu", aSubmenuData[0]);
                        this.getItem(1).cfg.setProperty("submenu", aSubmenuData[1]);
                        this.getItem(2).cfg.setProperty("submenu", aSubmenuData[2]);
                        this.getItem(3).cfg.setProperty("submenu", aSubmenuData[3]);

                    }

                });


                /*
                     Call the "render" method with no arguments since the 
                     markup for this Menu instance is already exists in the page.
                */

                oMenu.render();
            
            });

        </script>   

</head>
<g:isLoggedIn>
	<div class="buttonscontainer">
		<div class="buttons3">
			<a href="/mallow/">Home Page</a>
			<a href="/mallow/task/">Tasks</a>
			<a href="/mallow/issue/">Issues</a>
			<a href="/mallow/project/">Projects</a>
			<a href="/mallow/user/">Profile</a>
		</div>
	</div>
	<div><p>&nbsp;</p></div>
	<g:ifAllGranted role="ROLE_ADMIN">
        <div id="doc" class="yui-t1">
            <div id="bd">
                <!-- start: secondary column from outer template -->
                <div class="yui-b">

                    <div id="productsandservices" class="yuimenu">
                        <div class="bd">
                            <ul class="first-of-type">
                                <li class="yuimenuitem"><a class="yuimenuitemlabel" href="/mallow/backEnd">Back-End</a></li>
                            </ul>
                        </div>
                    </div>
                    
                </div>
                <!-- end: secondary column from outer template -->
            </div>
        </div>
	</g:ifAllGranted>
</g:isLoggedIn>
	
